<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>欢迎报名</title>
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"/>
	<link rel="stylesheet" href="business/style/common.css">
	<script src="business/js/jquery.js"></script>
    <link rel="stylesheet" href="http://demo.open.weixin.qq.com/jssdk/css/style.css?ts=1420774989">
    <script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="business/js/jquery.js"></script>
	<script src="app/js/common.js"></script>
<!-- 	 <link rel="stylesheet" href="style/normalize.css">
	 <link rel="stylesheet" href="style/style.css" media="screen" type="text/css" /> -->
	<style>
		*{padding:0;margin:0;}
		html{font-size:62.5%!important}
		.clear{clear:both;}
		.Mbanner img{width:100%;}
		.Mcontent{color:#aaa;font-family:微软雅黑;}
		.Mtitle{border:0.1rem solid #31afff;width:6.5rem;height:2.2rem;font-size:1.3rem;color:#31afff;text-align:center;line-height:2.2rem;margin:0 auto;border-radius:0.4rem;margin-top:2rem;margin-bottom:1rem;}
		.Mform{width:100%;padding-bottom:1.5rem;background:#fff;overflow: hidden;box-shadow:0 0 0.2rem #Eee;}
		.MformList{margin:0 1.5rem;border-bottom:0.1rem solid #eee;height:5.1rem;overflow: hidden;}
		.MformList1{margin:0 1.5rem;border-bottom:0.1rem solid #eee;height:5.1rem;overflow: hidden;}
		.MformListT{font-size:1.6rem;color:#aaa;margin-top:2.4rem;float:left;}
		.MformListT_input{height:3.4rem;margin-top:1.7rem;}
		.MformListT_input input,.MformListT_input_active input{height:3.4rem;border:none;color:#333;font-size:1.6rem;width:auto;}
		.MformListT_active{font-size:1.2rem;color:#31afff;margin-top:0.3rem;}
		.MformListT_input_active{height:3.4rem;margin-top:0;}
		.MformListT_input_active input{font-size:1.8rem;}
		.sex-radio{width:4.6rem;height:3rem;float:left;font-size: 1.6rem;line-height:3rem;margin-top:1.05rem;text-align:center;border-radius: 0.2rem;padding-left:1.5rem;margin-right:1.1rem;}
		.nan_radio{background:url(business/style/nan_no.png) no-repeat 1.5rem center #F7F7F7;background-size:1.2rem 1.5rem; }
		.nv_radio{background:url(business/style/nv_no.png) no-repeat 1.5rem center #F7F7F7;background-size:1.2rem 1.5rem; }
		.nan_radio_active{background:url(business/style/nan_ch.png) no-repeat 1.5rem center #31afff;background-size:1.2rem 1.5rem;color:#fff; }
		.nv_radio_active{background:url(business/style/nv_ch.png) no-repeat 1.5rem center #31afff;background-size:1.2rem 1.5rem; color:#fff;}
		.line{font-size:0;height:0.1rem;margin:0 1.5rem;background:#eee;}
		select{appearance:none;-moz-appearance:none;-webkit-appearance:none;border:none;width:100%;font-size:1.6rem;color:#333;background:#fff;}
		.submit_btn input{background:#31afff;color:#fffefe;font-size: 1.6rem;line-height: 4.4rem;text-align: center;margin:1rem 5%;width:90%;height:4.4rem;border-radius: 0.4rem;-webkit-appearance:none;border:none;}
		.roomRadio{width:9.1rem;height:3rem;background:#F7F7F7;border-radius: 0.4rem;float:right;text-align: center;line-height: 3rem;color:#aaa;margin-left:1rem;margin-top:1.05rem;font-size:1.6rem;}
		.MformList6{height:5.1rem;border-bottom: 1px solid #eee;margin:0 1.5rem;}
		.MformList6 .position{display:block; width:100%;height:5.1rem;}
		.MformList6 select{width:25rem;height:3rem;margin-top:2rem;color:#aaa;font-family: 微软雅黑;background:url(business/style/BJarrow.png) no-repeat right center;background-size:1.4rem 1rem;width:100%;}
		.MformListnurse{display:none;}
		tr,th,td {padding:0;margin:0;} 
		h1{text-align:center;width:100%;padding:0;margin:0;font-size:2rem;color:#31afff;font-family: 微软雅黑;}

		textarea{font-size:1.6rem;color:#aaa;font-family: 微软雅黑;resize: none;height:10rem;width:94%;border:none;margin-top: 0.8rem;margin-left:3%;}
	</style>
<body>



<!-- 	<a href="##列表页面"><div class="Mbanner"><img src="business/style/bmeet_list5.png" alt=""></div></a> -->
	<!-- <h1><strong>-&nbsp;欢迎报名&nbsp;-</strong></h1> -->
	<a class="Mcontent" href="<?= $meet_detail_url?>" style=" width:100%; display:block; background-color:#FFF; text-align:center; padding:16px 0; font-size:1.6rem;color:#31afff;text-decoration:none;">第七届全国新生儿疾病诊疗进展学术研讨会</a>
<form action="" method="post" id="form1">
	<div class="Mcontent">
		<div class="Mtitle">个人信息</div>
		<input type="hidden" name="meet_id" value="<?=$_REQUEST['meet_id']?>"/>
		<input type="hidden" name="id" value="<?=$meet['id']?>"/>
		<div class="Mform">
			<div class="MformList">
				<div class="MformListT">姓名</div>
				<div class="MformListT_input"><input type="text" name="name" value="<?=@$meet['name']?>"></div>
			</div>
			<div class="MformList MformList1">
            <?php if($meet['sex']=='男'):?>
				<input type="radio" name="sex" class="nan_radioT" value="男"  checked style="display:none;"  >
				<div class="nan_radio sex-radio" onclick="nanRadio()">男</div>

				<input type="radio" name="sex" class="nv_radioT" value="女" style="display:none;" >
				<div class="nv_radio sex-radio" onclick="nvRadio()">女</div>
            <?php elseif($meet['sex']=='女'):?>
				<input type="radio" name="sex" class="nan_radioT" value="男" style="display:none;"  >
				<div class="nan_radio sex-radio" onclick="nanRadio()">男</div>

				<input type="radio" name="sex"  class="nv_radioT" value="女" checked style="display:none;" >
				<div class="nv_radio sex-radio" onclick="nvRadio()">女</div>
			<?php  else:?>
				<input type="radio" name="sex"  value="男" class="nan_radioT" style="display:none;" >
				<div class="nan_radio sex-radio" onclick="nanRadio()">男</div>
				<input type="radio" name="sex" value="女"   class="nv_radioT" style="display:none;">
				<div class="nv_radio sex-radio"  onclick="nvRadio()">女</div>
            <?php endif; ?>

				<div class="clear"></div>
			</div>
			<div class="MformList">
				<div class="MformListT">科室</div>
				<div class="MformListT_input"><input type="text" value="<?=@$meet['keshi']?>" name="keshi"></div>
			</div>
			<div class="MformList6">
				<label class='position all' >
					<select name="position" id="position"  onchange="positoinch()">

                    <?php foreach($zhiwei as $k=>$v):?>
                    <?php if($v==$meet['zhiwei']):  ?>
						<option selected value="<?=$v?>"><?=$v?></option>
                    <?php else:?>
						<option  value="<?=$v?>"><?=$v?></option>
                    <?php endif;?>
                    <?php endforeach;?>
					</select>
				</label>
			</div>
			<div class="MformList6 MformListDr">
				<label class='position Dr' >
					<select name="Dr" id="Dr" >
						<?php foreach($zhiwu as $k=>$v):?>
						<?php if($v==$meet['zhiwu']):  ?>
						<option selected value="<?=$v?>"><?=$v?></option>
						<?php else: ?>
						<option  value="<?=$v?>"><?=$v?></option>
						<?php endif;?>
						<?php endforeach;?>

					</select>
				</label>
			</div>
			<div class="MformList6 MformListnurse">
				<label class='position nurse' >
					<select name="nurse" id="nurse">
                    <?php  foreach($zhiwu2 as $k=>$v):?>
                    <?php if($v==$meet['zhiwu']):  ?>
						<option selected value="<?=$v?>"><?=$v?></option>
                    <?php else: ?>
						<option  value="<?=$v?>"><?=$v?></option>
                    <?php endif;?>
                    <?php endforeach;?>
					</select>
				</label>
			</div>
			<div class="MformList">
				<div class="MformListT">手机</div>
				<div class="MformListT_input"><input type="number" value="<?=@$meet['phone']?>" name="phone"></div>
			</div>
			<div class="MformList">
				<div class="MformListT">电子邮箱</div>
				<div class="MformListT_input"><input type="text" name="email" value="<?=@$meet['email']?>"></div>
			</div>
		</div>

	</div>

	<div class="Mcontent">
		<div class="Mtitle">单位信息</div>
		<div class="Mform">
			<div class="MformList">
				<div class="MformListT">参加单位</div>
				<div class="MformListT_input"><input type="text" value="<?=@$meet['work_name']?>" name="work_name"></div>
			</div>
			<div class="MformList">
				<div class="MformListT">电话</div>
				<div class="MformListT_input"><input type="number" value="<?=@$meet['work_tel']?>" name="work_tel"></div>
			</div>
			<div class="MformList">
				<div class="MformListT">传真</div>
				<div class="MformListT_input"><input type="number" value="<?=@$meet['work_chuanzhen']?>" name="work_chuanzhen"></div>
			</div>
		</div>
	</div>
	<div class="Mcontent">
		<div class="Mtitle">您的建议</div>
		<div class="Mform">
			<textarea name="idea" id="" onfocus="funtextf()" onblur="funtextb()"><?=@$meet['idea']?></textarea>
		</div>
		
	</div>

	<!--<img src="business/style/footerimg111.jpg" alt="" width="100%" style="margin:1px 0px 1px;">-->
	<div class="submit_btn"><input type="submit" id="ok" value="确认报名"></div>
</form>
</body>
</html>
<script>
	//数据验证
	$(function(){
		$("#ok").click(function(){
			var name=$.trim($("input[name='name']").val());
			var sex=$.trim($("input[name='sex']:checked").val());
			var phone=$.trim($("input[name='phone']").val());
			var keshi=$.trim($("input[name='keshi']").val());
			var email=$.trim($("input[name='email']").val());
			var work_name=$.trim($("input[name='work_name']").val());

			if((name.length)==0){
				alert("请输入您的姓名!");
				return false;
			}
			if(sex.length==0){
				alert("请选择你的性别!");
				return false;
			}
			if(keshi.length==0){
				alert("请输入您的科室!");
				return false;
			}
			if(phone.length==0){
				alert("请输入您的手机号!");
				return false;
			}

			reg1=/^1[3|4|5|7|8][0-9]\d{8}$/;
			if (!reg1.test(phone)) {
				alert('您手机号码格式不正确');
				return false;
			}
			if(email.length==0){
				alert("请输入您的邮箱!");
				return false;
			}
			reg2=/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/;
			if (!reg2.test(email)) {
				alert('您邮箱格式不正确');
				return false;
			}
			if(work_name.length==0){
				alert("请输入您的参加单位!");
				return false;
			}

			$("#form1").submit();//form 表单的 id =form1
		});
	});



	window.onload = function (){
		for(i=0;i<$(".MformListT_input").length;i++){
			if($(this).val().length==0){
				$(this).parent(".MformListT_input_active").addClass("MformListT_input");
				$(this).parent(".MformListT_input").removeClass("MformListT_input_active");
				$(this).parent().prev(".MformListT_active").addClass("MformListT");
				$(this).parent().prev(".MformListT").removeClass("MformListT_active");
			}
		}
	}
	function nanRadio(){
		if($(".nan_radioT").attr("checked")){

		    }else{
		        $(".nan_radioT").click();
		        $(".nv_radio").removeClass("nv_radio_active");

		        $(".nan_radio").addClass("nan_radio_active");
		    }
	}

	function nvRadio(){
		if($(".nv_radioT").attr("checked")){
		    }else{
		        $(".nv_radioT").click();
		        $(".nan_radio").removeClass("nan_radio_active");
		        $(".nv_radio").addClass("nv_radio_active");
		    }
	}

	function MformListActive(){

	}

	$(".MformList").click(function(){
		$(this).children(".MformListT").addClass("MformListT_active");
		$(this).children(".MformListT_active").removeClass("MformListT");
		$(this).children(".MformListT_input").addClass("MformListT_input_active");
		$(this).children(".MformListT_input_active").removeClass("MformListT_input");
		$(this).children(".MformListT_input_active").children("input").focus();
	})

	$(".MformList input").blur(function(){
		if($(this).val().length==0){
			$(this).parent(".MformListT_input_active").addClass("MformListT_input");
			$(this).parent(".MformListT_input").removeClass("MformListT_input_active");
			$(this).parent().prev(".MformListT_active").addClass("MformListT");
			$(this).parent().prev(".MformListT").removeClass("MformListT_active");
		}
	})

	$(".all").click(function(){
		$(".all select").css("color","#333");
	})
	$(".Dr").click(function(){
		$(".Dr select").css("color","#333");
	})
	$(".nurse").click(function(){
		$(".nurse select").css("color","#333");
	})
	function positoinch(){

		if($("#position").val()=='医生'){
			$(".MformListDr").show();
			$(".MformListnurse").hide();
		}else{
			$(".MformListDr").hide();
			$(".MformListnurse").show();
		}

	}

 	function funtextf(){

 		if($("textarea").val()=="请输入您的建议（选填）"){
			$("textarea").val("");
 		}
 		$("textarea").css("color","#333")
 	}

 	function funtextb(){

 		if($("textarea").val().length==0){
 			$("textarea").val("请输入您的建议（选填）");
 			$("textarea").css("color","#aaa")
 		}else{
 			$("textarea").css("color","#333")
 		}
 	}

	window.onload=function(){
		$(".MformList input").each(function(){
			if($(this).val().length==0){
			}else{
				$(this).parent(".MformListT_input").addClass("MformListT_input_active");
				$(this).parent(".MformListT_input_active").removeClass("MformListT_input");
				$(this).parent().prev(".MformListT").addClass("MformListT_active");
				$(this).parent().prev(".MformListT_active").removeClass("MformListT");
			}
		});

		if($(".nan_radioT").attr("checked")){
			$(".nan_radio").addClass("nan_radio_active");
		}else if ($(".nv_radioT").attr("checked")){
			$(".nv_radio").addClass("nv_radio_active");
		}



		if($("#position").val()=='医生'){
			$(".MformListDr").show();
			$(".MformListnurse").hide();
		}else{
			$(".MformListDr").hide();
			$(".MformListnurse").show();
		}

		if($("textarea").val().length==0){
			$("textarea").val("请输入您的建议（选填）");
			$("textarea").css("color","#aaa")
		}else{
			$("textarea").css("color","#ccc")
		}
		
	}

    wx.config({
        debug: false,
        appId: '<?php echo $this->signPackage["appId"];?>',
        timestamp: <?php echo $this->signPackage["timestamp"];?>,
        nonceStr: '<?php echo $this->signPackage["nonceStr"];?>',
        signature: '<?php echo $this->signPackage["signature"];?>',
        jsApiList: [
            'onMenuShareAppMessage',
            'onMenuShareTimeline',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone'
        ]
    });

    title = '爱贝儿医的医师朋友们福利来啦！';
    desc = '第七届全国新生儿疾病诊疗进展学术研讨会“通过爱贝儿医报名，免会务费，还有学分！';
    links = '<?= $meet_detail_url ?>';
    imgUrl = '<?=G_SITE_CDN?>/business/style/Ybanner11.png';
    weixinShare(title, desc, links, imgUrl);
</script>
<?php require 'app/templates/common/foot.html'; ?>